home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / OS / FWGraphx / Include / FWShLiSh.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-11-08  |  3.5 KB  |  137 lines  |  [TEXT/MPS ]

  1. #ifndef FWSHLISH_H
  2. #define FWSHLISH_H
  3.  
  4. //========================================================================================
  5. //
  6. //    File:                FWShpLst.h
  7. //    Release Version:    $ 1.0d11 $
  8. //
  9. //    Copyright:    © 1995 by Apple Computer, Inc., all rights reserved.
  10. //
  11. //========================================================================================
  12.  
  13. // ----- Foundation Includes -----
  14.  
  15. #ifndef FWAUTODE_H
  16. #include <FWAutoDe.h>
  17. #endif
  18.  
  19. // ----- OS Includes
  20.  
  21. #ifndef FWSHAPE_H
  22. #include "FWShape.h"
  23. #endif
  24.  
  25. #ifndef FWSHPLST_H
  26. #include "FWShpLst.h"
  27. #endif
  28.  
  29. // ----- OpenDoc Includes -----
  30.  
  31. #ifdef _ODTYPES_
  32. #include <ODTypes.h>
  33. #endif
  34.  
  35. #if FW_LIB_EXPORT_PRAGMAS
  36. #pragma lib_export on
  37. #endif
  38.  
  39. //========================================================================================
  40. //    Forward Declarations
  41. //========================================================================================
  42.  
  43. class FW_CLASS_ATTR FW_CGraphicContext;
  44. class FW_CLASS_ATTR FW_CPoint;
  45. class FW_CLASS_ATTR FW_CRect;
  46. class FW_CLASS_ATTR FW_CShape;
  47.  
  48. //========================================================================================
  49. //    class FW_CShapeListShape
  50. //========================================================================================
  51.  
  52. class FW_CLASS_ATTR FW_CShapeListShape : public FW_CShape
  53. {
  54.  
  55. public:
  56.     FW_DECLARE_CLASS
  57.  
  58. //----------------------------------------------------------------------------------------
  59. //    Constructors/Destructors
  60. //
  61. public:
  62.                                 FW_CShapeListShape(const FW_PShapeList& list);
  63.                                 FW_CShapeListShape(const FW_CShapeListShape& other);
  64.                                 FW_CShapeListShape(FW_CReadableStream& archive);
  65.  
  66.     virtual                    ~FW_CShapeListShape();
  67.  
  68. //----------------------------------------------------------------------------------------
  69. //    Operators
  70. //
  71. public:
  72.     FW_CShapeListShape&            operator=(const FW_CShapeListShape& other);
  73.  
  74. //----------------------------------------------------------------------------------------
  75. //    New API
  76. //
  77.  
  78.     // ----- Shape list methods
  79.  
  80.     FW_PShapeList                GetShapeList() const;
  81.     void                        SetShapeList(const FW_PShapeList& list);
  82.  
  83.     
  84.     FW_CShape*                    HitTestList(FW_CGraphicContext& gc,
  85.                                              const FW_CPoint& test,
  86.                                              FW_CFixed tolerance) const;
  87.     
  88. //----------------------------------------------------------------------------------------
  89. //    Shape API
  90. //
  91. public:
  92.     // ----- Memory Management
  93.     virtual void                Purge();
  94.  
  95.     // ----- Rendering
  96.     virtual void                 Render(FW_CGraphicContext& gc) const;
  97.     static  void                RenderShapeList(FW_CGraphicContext& gc,
  98.                                                 const FW_PShapeList& shapeList);
  99.     
  100.     // ----- Copying
  101.     virtual FW_CShape*            Copy() const;
  102.     
  103.     // ----- Hit Testing
  104.     virtual FW_Boolean            HitTest(FW_CGraphicContext& gc,
  105.                                     const FW_CPoint& test,
  106.                                     FW_CFixed tolerance) const;
  107.     // ----- Transform
  108.     virtual void                Transform(Environment *ev, ODTransform* transform);
  109.     virtual void                InverseTransform(Environment *ev, ODTransform* transform);
  110.  
  111.     virtual void                MoveShape(FW_CFixed deltaX, FW_CFixed deltaY);
  112.     virtual void                MoveShapeTo(FW_CFixed x, FW_CFixed y);
  113.     
  114.     virtual void                Inset(FW_CFixed h, FW_CFixed v);
  115.     
  116.     // ----- Bounds
  117.     virtual void                 GetBounds(FW_CGraphicContext& gc, FW_CRect& rect) const;
  118.     
  119.     // ----- Archiving -----
  120.     virtual void                Flatten(FW_CWritableStream& archive) const;
  121.     static void*                 Read(FW_CReadableStream& archive);
  122.  
  123. //----------------------------------------------------------------------------------------
  124. //    Implementation
  125. //
  126.  
  127. private:
  128.     FW_PShapeList                fShapeList;
  129. };
  130.  
  131.  
  132. #if FW_LIB_EXPORT_PRAGMAS
  133. #pragma lib_export off
  134. #endif
  135.  
  136. #endif // FWSHLISH_H
  137.